package com.example.fengsam.aidong.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.fengsam.aidong.R;
import com.example.fengsam.aidong.activity.RunChartActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import de.hdodenhof.circleimageview.CircleImageView;

public class MeFragment extends Fragment {


    @BindView(R.id.avatar_imag)
    CircleImageView avatarImag;
    @BindView(R.id.name)
    TextView name;
    @BindView(R.id.job_text)
    TextView jobText;
    @BindView(R.id.info)
    LinearLayout info;
    @BindView(R.id.ll_step_record)
    LinearLayout ll_StepRecord;
    @BindView(R.id.ll_sport_histroy)
    LinearLayout ll_SportHistroy;
    @BindView(R.id.ll_my_share)
    LinearLayout ll_MyShare;
    @BindView(R.id.ll_my_activity)
    LinearLayout ll_MyActivity;
    @BindView(R.id.ll_about)
    LinearLayout ll_About;
    @BindView(R.id.ll_logoff)
    LinearLayout ll_Logoff;
    Unbinder unbinder;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_me, container, false);
        unbinder = ButterKnife.bind(this, view);
        return view;

    }

    @OnClick({R.id.ll_step_record,R.id.ll_logoff})
    public void OnClick(View v)
    {
        switch (v.getId())
        {
            case R.id.ll_step_record:
                startActivity(new Intent(getActivity(), RunChartActivity.class));
                break;
            case R.id.ll_logoff:

                break;
        }
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
